# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-fire
pkgver=0.6.0
pkgrel=0
pkgdesc="A library for automatically generating command line interfaces"
url="https://github.com/google/python-fire"
arch="noarch"
license="Apache-2.0"
depends="
	py3-six
	py3-termcolor
	python3
	"
makedepends="
	py3-gpep517
	py3-installer
	py3-setuptools
	py3-wheel
	"
checkdepends="
	py3-pytest-asyncio
	py3-hypothesis
	py3-mock
	py3-pytest
	"
source="https://pypi.python.org/packages/source/f/fire/fire-$pkgver.tar.gz"
builddir="$srcdir/fire-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m unittest discover
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
491f224d31038494be2f40dd55e8713da20e4a20dc044ed1346deaeff69d65908ac754679b36ae1dbf42319c26cb30acc664a444f2d735d173971001447a9dd3  fire-0.6.0.tar.gz
"
